function Train( tSVMTrainer )
	%
% 	% get the training and test set in a convenient format
% 	[	aafTrainingFeatures,		aiTrainingClasses,			...
% 		aafTestFeatures,			aiTestClasses			] =	...
% 			tSVMTrainer.GetTrainingAndTestSets( tSVMTrainer.fTrainingVsTestSetDimensionsRatio );
	%
	% bypass - get the whole dataset in the same convenient format TODO
	[	aafTrainingFeatures,		aiTrainingClasses,			...
		aafTestFeatures,			aiTestClasses			] =	...
			tSVMTrainer.GetTrainingAndTestSets(1);
	%
	aafTestFeatures = aafTrainingFeatures;
	aiTestClasses	= aiTrainingClasses
	%
	%
	% for readability
	iNumberOfClasses = PeopleCounters.GetNumberOfClasses();
	%
	% DEBUG
% 	[ aiTrainingClasses,	aafTrainingFeatures(:, 1:4) ]
% 	[ aiTestClasses,		aafTestFeatures(:, 1:4) ]
% 	aiListOfClasses
% 	pause
	%
	% do the learning step, one-against-all
	for iCurrentClass = 1:iNumberOfClasses;
		%
		% DEBUG
		fprintf('\nStarted training class %s\n', PeopleCounters.ConvertIntegerCodeIntoClassString(iCurrentClass));
		%
		% check that there is an instance for each class
		if(  sum( aiTrainingClasses == iCurrentClass ) < 2  )
			%
			warning('The training set does not comprise enough elements of all the various classes');
			tSVMTrainer.atSVMs{iCurrentClass} = [];
			%
		else%
			%
			% training
			tSVMTrainer.atSVMs{iCurrentClass} =						...
				svmtrain(											...
					double( aiTrainingClasses == iCurrentClass ),	...
					aafTrainingFeatures,							...
					tSVMTrainer.strSvmlibOptions					);
			%
		end;%
		%
	end;% cycle on the various classes
	%
	% do the estimation step
	aiEstimatedClasses =						...
		PeopleCounters.ClassifyEvents(			...
			tSVMTrainer.atEvents,				...
			tSVMTrainer.atSVMs					);
	%
	% DEBUG
% 	fprintf('measured    estimated\n');
% 	[ aiTestClasses, aiEstimatedClasses ]
% 	pause
	%
	% evaluate the fit on the test set
	tSVMTrainer.fEstimationAccuracy =				...
		sum( aiEstimatedClasses == aiTestClasses )	...
		/											...
		numel( aiTestClasses );
	%
	% plot the incorrectly classified events
	for iEvent = 1:numel(aiEstimatedClasses)
		%
		if(		tSVMTrainer.atEvents(iEvent).iResultingEstimatedClass	...
			~=	tSVMTrainer.atEvents(iEvent).iResultingMeasuredClass	)
			%
			tSVMTrainer.atEvents(iEvent).Plot();
			%
		end;%
		%
	end;%
	%
	% DEBUG
% 	tSVMTrainer.Plot();
	%
end % function




% 	% ---------------------------------------------------------------------
% 	% version for the native Matlab's SVM toolbox
% 	%
% 	% do the SVM training
% 	tSVMStruct = svmtrain(aafTrainingFeatures,aiTrainingClasses);
% 	%
% 	% do the test
% 	aiEstimatedClasses = svmclassify(tSVMStruct, aafTestFeatures);
% 	% ---------------------------------------------------------------------
